{template header}
<a href="?c=admin&a=GroupStatistic&gid={$gid}" target="_self"><i class="icon-eye-open"></i> 已加入群</a> &nbsp;&nbsp;
<a href="?c=admin&a=GroupStatisticCheck&gid={$gid}" target="_self"><i class="icon-eye-open"></i> 待审核</a> &nbsp;&nbsp;
<a href="?c=admin&a=GroupStatisticRunList&gid={$gid}" target="_self"><i class="icon-eye-open"></i> 群跑步记录列表</a> &nbsp;&nbsp;
<a href="?c=admin&a=GroupStatisticRecord&gid={$gid}" target="_self"><i class="icon-eye-open"></i> 群记录</a> &nbsp;&nbsp;
<a href="?c=admin&a=GroupStatisticMemberRun&gid={$gid}" target="_self"><i class="icon-eye-open"></i> 群成员跑步统计</a> &nbsp;&nbsp;
<a href="?c=admin&a=postList&boardId=-1&gid={$gid}" target="_self"><i class="icon-eye-open"></i> 群帖子列表</a> &nbsp;&nbsp;
<a href="?c=admin&a=GroupStatisticGeneral&gid={$gid}" target="_self"><i class="icon-eye-open"></i> 概览</a> &nbsp;&nbsp;
<a href="#joinGroup" role="button" class="btn" data-toggle="modal">添加到群</a> &nbsp;&nbsp;
<div class="bs-docs-example">
    <table class="table table-striped">
        <thead>
            <tr>
            	<th>头像</th>
                <th>用户ID</th>
            	<th>昵称</th>
                <th>角色</th>
                <th>加入时间</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {if !$list}  
                <tr>
                    <td>暂无记录</td>
                    <td></td>     
                    <td></td>    
                    <td></td> 
                    <td></td>
                    <td></td>               
                </tr>
            {else}

            {loop $list $k $v}
            <tr>
                <td><image src="{$v['header']}" width="30" height="30" /></td>
                <td>{$v['uid']}</td>    
                <td><a href="?c=admin&a=userinfo&uid=$v['uid']">{$v['nickname']}</a></td>     
                <td>{if $v['role'] == 0}普通成员{elseif $v['role'] == 1}群主{elseif $v['role'] == 2}群组管理员{elseif $v['role'] == 3}已不在群组中{/if}</td>    
                <td>{eval echo date('Y-m-d H:i:s', $v['addtime']);}</td>     
                <td>
                    {if $v['role'] == 0}
                    <a class="btn btn-edit" href="?c=admin&a=setGroupAdmin&gid={$v['gid']}&uid={$v['uid']}">设置为管理员</a>
                    <a class="btn btn-edit" href="?c=admin&a=delGroupMember&gid={$v['gid']}&uid={$v['uid']}">删除成员</a>
                    {/if}
                    {if $v['role'] == 2}<a class="btn btn-edit" href="?c=admin&a=cancelGoupAdmin&gid={$v['gid']}&uid={$v['uid']}">取消管理员</a>{/if}
                </td>          
            </tr>
            {/loop}

            {/if}
        </tbody>
    </table>
</div>
<div class="pagination">
    <ul>
        {$pageStr}
    </ul>
</div>

<!-- Modal -->
<div id="joinGroup" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">添加到群</h3>
  </div>
  <form action="?c=admin&a=joinGroup" method="POST" target="_blank">
  <div class="modal-body">
    <label>群ID</label>
    <input type="text" name="gid">
    <label>用户ID</label>
    <input type="text" name="uid">
  </div>
  <div class="modal-footer">
    <button type="button" class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
    <button type="submit" class="btn btn-primary">提交</button>
  </div>
  </form>
</div>
{template footer}